package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.Customer;
import com.atguigu.jxc.entity.Supplier;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author wswdkl
 * @version 1.0
 * @date 2022/2/11 14:46
 */
public interface CustomerDao {

    /**
     * 根据客户名查询客户数量
     * @param customerName
     * @return
     */
    int getCustomerCount(@Param("customerName") String customerName);

    /**
     * 分页查询所有的客户名
     * @param offSet
     * @param rows
     * @param customerName
     * @return
     */
    List<Customer> queryCustomerPage(@Param("offSet") int offSet, @Param("rows") Integer rows, @Param("customerName") String customerName);

    /**
     * 添加客户
     * @param customer
     * @return
     */
    int insertCustomer(@Param("customer") Customer customer);

    /**
     * 修改客户
     * @param customer
     * @return
     */
    int updateCustomer(@Param("customer") Customer customer);

    /**
     * 删除客户 支持删除多个
     * @param idList
     * @return
     */
    int deleteCustomer(@Param("idList") String[] idList);
}
